﻿using MarketplaceWebService.Model;
using MODEL;
using SysHelper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SysController
{
    public static class SystemController
    {

        private static List<UP_GetMwsModel_Result> mwslist;

        public static List<UP_GetMwsModel_Result> MwsList
        {
            get { return mwslist; }
            set { mwslist = BaseController.Mws(); }
        }

        public static void Category()
        {
            //if (!MwsInfoListIsNotNull())
            //    if (!GetMwsInfoList())
            //        return;
            //UP_GetMwsModel_Result Result=  MwsInfoList.Where(s => s.AccountInfoID == 1).FirstOrDefault();
            //if(Result==null)return ;
            //RequestReportRequest requestReportRequest = InvokeController.RequestReport(Result, ReportTypeEnum._GET_XML_BROWSE_TREE_DATA_);
            //MarketplaceWebService.MarketplaceWebService service = ServiceController.ReportsMarketplaceWebService(Result);
            //ReportsController.InvokeRequestReport(service, requestReportRequest); 
        }

        public static void GetCategory()
        {
            //if (!MwsInfoListIsNotNull())
            //    if (!GetMwsInfoList())
            //        return;
            //UP_GetMwsModel_Result Result = MwsInfoList.Where(s => s.AccountInfoID == 1).FirstOrDefault();
            //if (Result == null) return;
            //GetReportRequestListRequest getReportRequestListRequest = InvokeController.GetReportRequestList(Result, ReportTypeEnum._GET_XML_BROWSE_TREE_DATA_);
            //MarketplaceWebService.MarketplaceWebService service = ServiceController.ReportsMarketplaceWebService(Result);

            //ReportsController.InvokeGetReportRequestList(service, getReportRequestListRequest);

        }

        public static void GetCategoryInfo()
        {
            //if (!MwsInfoListIsNotNull())
            //    if (!GetMwsInfoList())
            //        return;
            //UP_GetMwsModel_Result Result = null;// MwsInfoList.Where(s => s.AccountInfoID == 1).FirstOrDefault();
            //if (Result == null) return;

            //GetReportListRequest Request = InvokeController.GetReportList(Result, OperateContext.CurrentContext.BllSession.IReportRequestInfo_BLL.GetListByWhere(s => s.IsDel == false), ReportTypeEnum._GET_XML_BROWSE_TREE_DATA_);
            //MarketplaceWebService.MarketplaceWebService service = ServiceController.ReportsMarketplaceWebService(Result);

            //ReportsController.InvokeGetReportList(service, Request);
        }



        public static void GetCategoryID()
        {
            //  if (!MwsInfoListIsNotNull())
            //    if (!GetMwsInfoList())
            //        return;
            //UP_GetMwsModel_Result Result = MwsInfoList.Where(s => s.AccountInfoID == 1).FirstOrDefault();
            // MarketplaceWebService.MarketplaceWebService service = ServiceController.ReportsMarketplaceWebService(Result);


            // GetReportRequest Request = InvokeController.GetReport(Result);
            // ReportsController.InvokeGetReport(service, Request);
        }


        public static void GetAmazonCategoryInfo(int MarketplacesID)
        {
            if (MwsList == null) return;
            foreach (var item in MwsList)
            {
                //InvokeController.
            }

        }





    }
}
